//
//  BelleCell.m
//  LOL_JewelBox
//
//  Created by dllo on 15/4/27.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "BelleCell.h"

@implementation BelleCell

- (void)dealloc
{
    [_iconImageView release];
    [_titleLabel release];
    [_shortLabel release];
    [super dealloc];
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.iconImageView = [[UIImageView alloc]init];
        [self.contentView addSubview:self.iconImageView];
        self.iconImageView.contentMode = UIViewContentModeScaleAspectFill;
        self.iconImageView.autoresizesSubviews = YES;
        self.iconImageView.clipsToBounds = YES;
        self.iconImageView.layer.cornerRadius = 5;
        [_iconImageView release];
        
        self.titleLabel = [[UILabel alloc]init];
        [self.contentView addSubview:self.titleLabel];
        self.titleLabel.font = [UIFont  fontWithName:@"Helvetica-Bold" size:16];
        self.titleLabel.numberOfLines = 0;
        [_titleLabel release];
        
        self.shortLabel = [[UILabel alloc]init];
        [self.contentView addSubview:self.shortLabel];
        self.shortLabel.font = [UIFont systemFontOfSize:12];
        self.shortLabel.numberOfLines = 0;
        [_shortLabel release];
    }
    return self;
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    self.iconImageView.frame = CGRectMake(CONTENTWIDTH *0.01333, CONTENTHEIGHT *0.08333, CONTENTWIDTH *0.32, CONTENTHEIGHT *0.83333);
    self.titleLabel.frame = CGRectMake(CONTENTWIDTH *0.34666, CONTENTHEIGHT *0.04167, CONTENTWIDTH *0.64, CONTENTHEIGHT *0.41667);
    self.shortLabel.frame = CGRectMake(CONTENTWIDTH *0.34666, CONTENTHEIGHT *0.41667, CONTENTWIDTH *0.64, CONTENTHEIGHT *0.5);
}

@end
